import request from '@/utils/request'

export const getChapterVideo = (data) => {
  return request({
    url:`eduservice/chapter/getChapterVideo/${data}`,
    method:'get'
  })
}

export const getChapter = (data) => {
  return request({
    url:`eduservice/chapter/getChapter/${data}`,
    method:'get'
  })
}
export const deleteChapter = (data) => {
  return request({
    url:`eduservice/chapter/deleteChapter/${data}`,
    method:'delete'
  })
}

export const addChapter = (data) => {
  return request({
    url:`eduservice/chapter/addChapter`,
    method:'post',
    data
  })
}

export const updateChapter = (data) => {
  return request({
    url:`eduservice/chapter/updateChapter`,
    method:'put',
    data
  })
}

export default { getChapterVideo, addChapter, getChapter, updateChapter, deleteChapter }